<?php !defined("IN_SYSTEM") && exit("ACCESS DENY");?>
{template header}
{template top}
<div id="uc">
{template uc/left}
<div id="uc_main">
	<div class="uc_tab">
	<ul>
		<li>{if $action=='diary'}<span class="on">点评列表</span>{else}<a href="{url home.php?f=caipu&a=diary}">每日菜谱</a>{/if}</li>
		<li>{if $action=='hobby'}<span class="on"> 未点评</span>{else}<a href="{url home.php?f=caipu&a=hobby}">喜好菜系</a>{/if}</li>
	</ul>
	</div>
	
	<div id="uc_contain">
	    <script type="text/javascript">
          function commstart(id,k){
        	  $("#commentstar"+k+" img").attr("src","static/images/unstar.png");
        	  for(var i=0;i<id;i++){
        		  $($("#commentstar"+k+" img")[i]).attr('src',"static/images/star.png");
        	  }
			  document.getElementById('star'+k).value=id;
			  obj = document.getElementById('commentdesc'+k);
			  switch(id){
			  	case 1:
			  		obj.innerHTML='差(1星)';
				  break;
			  	case 2:
			  		obj.innerHTML='一般(2星)';
				  break;
			  	case 3:
			  		obj.innerHTML='好(3星)';
				  break;
			  	case 4:
			  		obj.innerHTML='很好(4星)';
				  break;
			  	case 5:
			  		obj.innerHTML='非常好(5星)';
				  break;
				  
			  }
          }
    </script>
	{loop $caidans $c}
	菜名:{$c['title']}  菜价:{$c['price']} 数量:{$c['qty']}
	
	<form action="{url home.php?f=dianpin&a=save&id=$c[txnid]}" method="post" name="dianpin_add">
	<table cellspacing="0" class="uc_fa_table">
		<tbody><tr><td>
	<h3>评价等级</h3></td><td>
	<input type="hidden" name="caidan" value="{$c['pid']}"/>
	<span id="commentstar{$c['pid']}">
          <a onmouseover="commstart(1,{$c['pid']})" href="javascript:;"><img src="static/images/star.png"></a>
          <a onmouseover="commstart(2,{$c['pid']})" href="javascript:;"><img src="static/images/star.png"></a>
          <a onmouseover="commstart(3,{$c['pid']})" href="javascript:;"><img src="static/images/star.png"></a>
          <a onmouseover="commstart(4,{$c['pid']})" href="javascript:;"><img src="static/images/star.png"></a>
          <a onmouseover="commstart(5,{$c['pid']})" href="javascript:;"><img src="static/images/star.png"></a>
          </span>
      <span style="font-weight:bold;font-size:13px;margin-left:21px;" id="commentdesc{$c['pid']}">非常好(5星)</span>    
    <br/>
    <input type="hidden" id="star{$c['pid']}" value="5" name="star">
    </td></tr>
    <tr><td> 
	<h3>评价内容</h3></td><td>
	<textarea onclick="if(this.value=='请认真准确的填写您的评价'){this.value='';this.style.color='#333';}"  rols="7" cols="56" name="content">请认真准确的填写您的评价</textarea>
	</td></tr>
	<tr><td></td><td> 
	<input type="submit" value="评论" class="button">
	</td></tr></tbody></table>
	</form>
	
	{/loop}
	
	</div>
</div>
</div>
{template footer}